package org.hxyjs.dto;

import java.io.IOException;
import java.util.Properties;

/**
 * 主要用于存放各种提示信息
 * @author:LG
 * @date:Created at 2019/03/09
 */
//一个消息类 有两种成员变量一种是小写的可以改变的变量（读取properties文件），第二种是大小的不能改变的变量（提供给DTO）
public class Messages {
    //专家开始
    private static String getExpertAllSuccess= "";
    private static String getExpertAllFail= "";
    private static String getExpertSuccess= "";
    private static String getExpertFail= "";
    private static String addExpertSuccess= "";
    private static String addExpertFail= "";
    private static String deleteExpertSuccess= "";
    private static String deleteExpertFail= "";
    private static String updateExpertSuccess= "";
    private static String updateExpertFail= "";

    //专家活动记录
    private static String getExpertActivityRecordAllSuccess= "";
    private static String getExpertActivityRecordAllFail= "";
    private static String getExpertActivityRecordSuccess= "";
    private static String getExpertActivityRecordFail= "";
    private static String addExpertActivityRecordSuccess= "";
    private static String addExpertActivityRecordFail= "";
    private static String deleteExpertActivityRecordSuccess= "";
    private static String deleteExpertActivityRecordFail= "";
    private static String updateExpertActivityRecordSuccess= "";
    private static String updateExpertActivityRecordFail= "";

    //推荐方案
    private static String getProgrammeAllSuccess= "";
    private static String getProgrammeAllFail= "";
    private static String getProgrammeSuccess= "";
    private static String getProgrammeFail= "";
    private static String addProgrammeSuccess= "";
    private static String addProgrammeFail= "";
    private static String deleteProgrammeSuccess= "";
    private static String deleteProgrammeFail= "";
    private static String updateProgrammeSuccess= "";
    private static String updateProgrammeFail= "";

    //比赛详情类型
    private static String getGameDetailsRecordAllSuccess= "";
    private static String getGameDetailsRecordAllFail= "";
    private static String getGameDetailsRecordSuccess= "";
    private static String getGameDetailsRecordFail= "";
    private static String addGameDetailsRecordSuccess= "";
    private static String addGameDetailsRecordFail= "";
    private static String deleteGameDetailsRecordSuccess= "";
    private static String deleteGameDetailsRecordFail= "";
    private static String updateGameDetailsRecordSuccess= "";
    private static String updateGameDetailsRecordFail= "";

    static{
       Properties prop = new Properties();// 空的配置类
       try {
           prop.load(Messages.class.getResourceAsStream("/messages.properties"));// Object.class找到jvm运行的class文件所在的目录，
       } catch (IOException e) {
           e.printStackTrace();
       }
       // getResourceAsStream 以流的形式将文件读到内存，不写/ 根路径表示当前class所在的文件夹下面找文件 写
       // 根路径就是当前项目下面找文件 bin

        //专家
        getExpertAllSuccess = prop.get("getExpertAllSuccess").toString();
        getExpertAllFail = prop.get("getExpertAllFail").toString();
        getExpertSuccess = prop.get("getExpertSuccess").toString();
        getExpertFail = prop.get("getExpertFail").toString();
        addExpertSuccess = prop.get("addExpertSuccess").toString();
        addExpertFail = prop.get("addExpertFail").toString();
        deleteExpertSuccess = prop.get("deleteExpertSuccess").toString();
        deleteExpertFail = prop.get("deleteExpertFail").toString();
        updateExpertSuccess = prop.get("updateExpertSuccess").toString();
        updateExpertFail = prop.get("updateExpertFail").toString();

        //专家活动记录
        getExpertActivityRecordAllSuccess = prop.get("getExpertActivityRecordAllSuccess").toString();
        getExpertActivityRecordAllFail = prop.get("getExpertActivityRecordAllFail").toString();
        getExpertActivityRecordSuccess = prop.get("getExpertActivityRecordSuccess").toString();
        getExpertActivityRecordFail = prop.get("getExpertActivityRecordFail").toString();
        addExpertActivityRecordSuccess = prop.get("addExpertActivityRecordSuccess").toString();
        addExpertActivityRecordFail = prop.get("addExpertActivityRecordFail").toString();
        deleteExpertActivityRecordSuccess = prop.get("deleteExpertActivityRecordSuccess").toString();
        deleteExpertActivityRecordFail = prop.get("deleteExpertActivityRecordFail").toString();
        updateExpertActivityRecordSuccess = prop.get("updateExpertActivityRecordSuccess").toString();
        updateExpertActivityRecordFail = prop.get("updateExpertActivityRecordFail").toString();

        //推荐方案
        getProgrammeAllSuccess = prop.get("getProgrammeAllSuccess").toString();
        getProgrammeAllFail = prop.get("getProgrammeAllFail").toString();
        getProgrammeSuccess = prop.get("getProgrammeSuccess").toString();
        getProgrammeFail = prop.get("getProgrammeFail").toString();
        addProgrammeSuccess = prop.get("addProgrammeSuccess").toString();
        addProgrammeFail = prop.get("addProgrammeFail").toString();
        deleteProgrammeSuccess = prop.get("deleteProgrammeSuccess").toString();
        deleteProgrammeFail = prop.get("deleteProgrammeFail").toString();
        updateProgrammeSuccess = prop.get("updateProgrammeSuccess").toString();
        updateProgrammeFail = prop.get("updateProgrammeFail").toString();

        //比赛详情类型
        getGameDetailsRecordAllSuccess = prop.get("getGameDetailsRecordAllSuccess").toString();
        getGameDetailsRecordAllFail = prop.get("getGameDetailsRecordAllFail").toString();
        getGameDetailsRecordSuccess = prop.get("getGameDetailsRecordSuccess").toString();
        getGameDetailsRecordFail = prop.get("getGameDetailsRecordFail").toString();
        addGameDetailsRecordSuccess = prop.get("addGameDetailsRecordSuccess").toString();
        addGameDetailsRecordFail = prop.get("addGameDetailsRecordFail").toString();
        deleteGameDetailsRecordSuccess = prop.get("deleteGameDetailsRecordSuccess").toString();
        deleteGameDetailsRecordFail = prop.get("deleteGameDetailsRecordFail").toString();
        updateGameDetailsRecordSuccess = prop.get("updateGameDetailsRecordSuccess").toString();
        updateGameDetailsRecordFail = prop.get("updateGameDetailsRecordFail").toString();

   }

    //专家
    public final static String GETEXPERTALLSUCCESS= getExpertAllSuccess;
    public final static String GETEXPERTALLFAIL= getExpertAllFail;
    public final static String GETEXPERTSUCCESS= getExpertSuccess;
    public final static String GETEXPERTFAIL= getExpertFail;
    public final static String ADDEXPERTSUCCESS= addExpertSuccess;
    public final static String ADDEXPERTFAIL= addExpertFail;
    public final static String DELETEEXPERTSUCCESS= deleteExpertSuccess;
    public final static String DELETEEXPERTFAIL= deleteExpertFail;
    public final static String UPDATEEXPERTSUCCESS= updateExpertSuccess;
    public final static String UPDATEEXPERTFAIL= updateExpertFail;

    //专家活动记录
    public final static String GETEXPERTACTIVITYRECORDALLSUCCESS= getExpertActivityRecordAllSuccess;
    public final static String GETEXPERTACTIVITYRECORDALLFAIL= getExpertActivityRecordAllFail;
    public final static String GETEXPERTACTIVITYRECORDSUCCESS= getExpertActivityRecordSuccess;
    public final static String GETEXPERTACTIVITYRECORDFAIL= getExpertActivityRecordFail;
    public final static String ADDEXPERTACTIVITYRECORDSUCCESS= addExpertActivityRecordSuccess;
    public final static String ADDEXPERTACTIVITYRECORDFAIL= addExpertActivityRecordFail;
    public final static String DELETEEXPERTACTIVITYRECORDSUCCESS= deleteExpertActivityRecordSuccess;
    public final static String DELETEEXPERTACTIVITYRECORDFAIL= deleteExpertActivityRecordFail;
    public final static String UPDATEEXPERTACTIVITYRECORDSUCCESS= updateExpertActivityRecordSuccess;
    public final static String UPDATEEXPERTACTIVITYRECORDFAIL= updateExpertActivityRecordFail;

    //推荐方案
    public final static String GETPROGRAMMEALLSUCCESS= getProgrammeAllSuccess;
    public final static String GETPROGRAMMEALLFAIL= getProgrammeAllFail;
    public final static String GETPROGRAMMESUCCESS= getProgrammeSuccess;
    public final static String GETPROGRAMMEFAIL= getProgrammeFail;
    public final static String ADDPROGRAMMESUCCESS= addProgrammeSuccess;
    public final static String ADDPROGRAMMEFAIL= addProgrammeFail;
    public final static String DELETEPROGRAMMESUCCESS= deleteProgrammeSuccess;
    public final static String DELETEPROGRAMMEFAIL= deleteProgrammeFail;
    public final static String UPDATEPROGRAMMESUCCESS= updateProgrammeSuccess;
    public final static String UPDATEPROGRAMMEFAIL= updateProgrammeFail;

    //比赛详情类型
    public final static String GETGAMEDETAILSRECORDALLSUCCESS= getGameDetailsRecordAllSuccess;
    public final static String GETGAMEDETAILSRECORDALLFAIL= getGameDetailsRecordAllFail;
    public final static String GETGAMEDETAILSRECORDSUCCESS= getGameDetailsRecordSuccess;
    public final static String GETGAMEDETAILSRECORDFAIL= getGameDetailsRecordFail;
    public final static String ADDGAMEDETAILSRECORDSUCCESS= addGameDetailsRecordSuccess;
    public final static String ADDGAMEDETAILSRECORDFAIL= addGameDetailsRecordFail;
    public final static String DELETEGAMEDETAILSRECORDSUCCESS= deleteGameDetailsRecordSuccess;
    public final static String DELETEGAMEDETAILSRECORDFAIL= deleteGameDetailsRecordFail;
    public final static String UPDATEGAMEDETAILSRECORDSUCCESS= updateGameDetailsRecordSuccess;
    public final static String UPDATEGAMEDETAILSRECORDFAIL= updateGameDetailsRecordFail;

    public static void main(String[] args) {
        System.out.println(Messages.GETPROGRAMMEALLSUCCESS);
        System.out.println(Messages.GETPROGRAMMEALLFAIL);
        System.out.println(Messages.GETPROGRAMMESUCCESS);
        System.out.println(Messages.GETPROGRAMMEFAIL);
        System.out.println(Messages.ADDPROGRAMMESUCCESS);
        System.out.println(Messages.ADDPROGRAMMEFAIL);
        System.out.println(Messages.DELETEPROGRAMMESUCCESS);
        System.out.println(Messages.DELETEPROGRAMMEFAIL);
        System.out.println(Messages.UPDATEPROGRAMMESUCCESS);
        System.out.println(Messages.UPDATEPROGRAMMEFAIL);
    }
}
